#include <iostream>
using namespace std;
#define maxn 101
int compar(char s1[],char s2[]){
	int i=0;int cpl=0;
	for(;i<maxn;++i){
		if(s1[i]=='\0'&&s2[i])return -1;
		if(s1[i] && s2[i]=='\0')return 1;
		if(s1[i]=='\0' && s2[i]=='\0')return 0;
		cpl=s1[i]-s2[i];
		if(cpl)break;
	}
	if(cpl>1)cpl=1;
	if(cpl<-1)cpl=-1;
	return cpl;
} 
int main(){
	char a[maxn], b[maxn]={0};
	cin>>a>>b;
	cout<<compar(a,b);
	return 0;	
}
